package com.controller;

import com.domain.JsonResult;
import com.domain.PageObject;
import com.domain.sys.SysLog;
import com.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/log")
public class SysLogController {
    @Autowired
    private SysLogService sysLogService;

    @GetMapping("/doFindPageObjects")
    public JsonResult doFindPageObjects(String username,Integer pageCurrent){
        PageObject<SysLog> pageObject = sysLogService.findPageObjects(username,pageCurrent);
        return new JsonResult(pageObject);
    }



    @RequestMapping("/doDeleteObjects")
    public JsonResult doDeleteObjects(Integer...ids){
        sysLogService.deleteObjects(ids);
        return new JsonResult("delete ok");
    }


}
